Automated Mail Processing

The CommuniGate System allows you to process messages automatically. You can use this feature to simplify managing your mail, to create "infobots", to implement sophisticated notification schemes, etc.
This page explains how you can create and use mail processing Rules - the instructions that specify which messages should be automatically processed and how they should be processed.

 
  • User and Station Rules
  • Server-Wide Rules
  • Specifying Rule Conditions
  • Specifying Rule Actions
  • Mailing Loop Hazard
  • User and Station Rules

    There are two sets of Rules for each CommuniGate user. The Station Rules are stored on the workstation disk. They are applied by the CommuniGator application when the user sends a message or opens an unread message. The User Rules are stored on the CommuniGate Server disk. These Rules are applied to incoming messages as soon as they appear in the user account (in the user In Box). The User Rules are applied by the CommuniGate Server itself, and it does not matter if the user is connected to the Server or not.

    Each Rule has a name assigned by the user, and every CommuniGate user can have as many Station and User Rules as necessary.

    To avoid Server overload, not all users can specify their User Rules. To be able to specify User Rules, a user should have the Can Specify Rules access right granted by the system administrator.

    If a user does not have the Can Specify Rules access right, the User Rules already entered are still in effect. The system administrator can grant that right to some user, log in using that user name, specify the appropriate User Rules, log out and revoke the Can Specify Rules access right. In this case the Rules entered for that user by the administrator remain in effect.

    To create, view, modify and remove your Station Rules, choose Station Rules from the Edit menu.
    To create, view, modify and remove your User Rules, choose User Rules from the Edit menu.

    When you select one of these commands, the list of the existing Rules appears. Select a Rule and click the Open button to modify an existing Rule, or click New to create a new Rule. A window appears and allows you to compose a Rule:

     Server-Wide Rules

    Besides Station and User Rules, there are Server-Wide rules are available in Rules menuitem in Server menu. They are stored on CommuniGate Server disk, but unlike User Rules, they are not associated with particular user and applied to all messages being received or auto-generated by CommuniGate Server.

     

    Specifying Rule Conditions

    Each Rule contains the conditions (IF) part and the actions (THEN) part. When a Rule is applied to a message, the conditions are checked first. If all conditions are met, then the specified actions are taken.

    To specify a condition, select the message element to check from the pop-up menu under the IF word. When an element is selected, you compose a condition using the pop-up menu with operation names and the argument value field that appear on the right of the element name.

    Some of the available message elements are strings. You specify a sample string in the parameter value field and choose one of the following comparison operations: "is", "is not", "contains", does not contain", "starts with", "ends with". The string comparison operations are case-insensitive.

    The following string elements can be used in both Station and User Rules:
    Subject Text: the message Subject.
    From Address: the 'From:' E-mail address of the message; if the message From address is not of the E-mail type, it is transformed into the E-mail type as explained in the Message Routing chapter.
    From Name:  the Primary Name in the From address record.
    Sender Address: the 'Sender:' E-mail address of the message; if the message Sender address is not of the E-mail type, it is transformed into the E-mail type as explained in the Message Routing chapter.
    Sender Name: the Primary Name in the Sender address record.
    Recipient Address: the address of the message recipient; if the message has several recipients, the check passes if the condition is met for at least one of the recipient addresses.
    Recipient Name:  the same as above for the Primary Name attributes in the recipient address records.
    Each Recipient Address: the address of the message recipient; if the message has several recipients, the check passes if the condition is met for all recipient addresses.
    Each Recipient Name: the same as above for the Primary Name attributes in the recipient address records.
     
    In Station Rules, you can use the following strings:
    Attachment Name: the name of the attached file; if the message has several attachments, the check passes if the condition is met for at least one of the attached files.
    Message Text: the text body of a message (with all style information and embedded objects removed).
     

    Several Rule conditions allow you to check dates and times. The argument field specifies the time value (in local time) to compare with. The comparison operations available are: "is", "is not", "is before", "is after":
    Sent Date: the date when the message was sent. 
    Current Date: the current date. 
    Current Day of Week: the day name - from Monday till Sunday. 
    Current Time of Day: the local time of day.
     
    You can also specify a "relative time" condition, i.e. checking the time between the specified event and the current time. The comparison operations you can specify are: "earlier than", "later than":
    Sent: the date and time when the message was sent.
    Some of the message elements you can check have numeric values. The comparison operations available are: "is", "is not", "is less than", "is greater than":
    Message Size: the size of the message on disk. 
    Message Text Size: the size of the message textual body without the style information and embedded objects. 
    Number of Attachments: the number of the attached files.
    Attachments Size: the total size of all attached files.
     

    You can check if the message body is a generic text or fax pages, the "is" and "is not" comparison operations are supported:
    Message Body Type checks the type of the first body element found in the message (a message can contain several body elements).
     

    The following condition can be used in User Rules only:
    Client  checks if your are connected (i.e. if you are running the CommuniGator application on one of workstations), or if you are completely off line (which means there is no computer on the network that runs the Notifier to monitor your mailbox).
     
    Each Rule can have several conditions. The Rule actions are applied only if all its conditions are met.
    To add a condition, click the triangle icon below the last condition. The icon will turn and a new condition line is inserted. The remove a condition, click the triangle icon above that condition.
    You can remove all conditions, in this case the Rule will be applied to all messages.

    Specifying Rule Actions

     When all Rule conditions are met, the Rule actions are applied to the message. You specify the Rule actions in the bottom part of the Rule Editor window.

    To specify an action, select the action operation from the pop-up menu under the THEN word. When an action operation is selected, a parameter field appears on the right of the menu allowing you to set the action operation parameters.

    The following operations are supported in both Station and User Rules:
     
    Delete deletes a message; note that if it is used in a User Rule, the message is not moved into the Trash mailbox, but it is deleted immediately. This is a "final action", i.e. processing of this Rule stops, and no other Rules are applied to this message.
    Forward To forwards the message to the addresses specified in the parameter field. Click the parameter field button to bring up the Address Books panel and specify the addresses.
    Redirect To the same as above, but the message is redirected.
    Mark as Unread marks a message as Unread.
    Mark as Replied marks a message as Replied to.
    Mark as Redirected marks a message as Redirected.
    Stop Processing specifies a "final action"; processing of this Rule stops, and no other Rules are applied to this message.
    Reply with composes a message as specified in the parameter field and sends it as a reply by adding the sender address to the recipients list of the composed message. To specify the reply message elements, click the parameter field button.
    Reply to All with the same as above, but the addresses of all original message recipients are added to the composed message recipients list, too.
    React with the same as above, but no addresses are added to the composed message recipients list: only the addresses specified in the "picture" message are used. 
    When you compose a "picture" for a reply or reaction letter, you can specify how to include the original message data into the Subject and into the message body texts. Use these special character combinations: 
    $T - date and time (local) 
    $t - date and time (GMT) 
    $F - name of author 
    $f - E-mail address of author 
    $n - name if present, E-mail address otherwise 
    $S - subject 
    $Z - size
    Set Note set message's note text that will be displayed instead of subject text in In Box window. You can also use above characters to include message data into note text.
    The following actions can be used in Station Rules only:
    Transfer To transfers the message to the local mailbox specified with the parameter pop-up menu; the remaining actions will be applied to the transferred letter; no other Rule will be applied to this message.
    Copy To copies the message to the local mailbox specified with the parameter pop-up menu; the remaining actions will be applied to the original message.
    Print prints the message.
    Open opens a document specified with the parameter ; it can be a sound file (for special audio notifications), or an application, or any other file that can be opened with the Finder.
    Each Rule can specify several actions. They are taken one-by-one, from the first till the last one, or till a "final" one (as Delete).

    To add an action, click the triangle icon below the last action. The icon will turn and a new action line is inserted. To remove an action, click the triangle icon above that action.

    The options in the Apply Rule to: box specify the messages the Rule should be applied to.  If the In Box option is selected for a Station Rule, the Rule is applied to every unread message in your In Box when that message is opened.  If the Sent Messages option is selected for a Station Rule, the Rule is applied to every message you send right after it has been submitted to the Server. The Save Sent Messages on Disk option works as a low-priority Rule that Transfers to the Sent Messages mailbox . So, if some Station Rule deletes a sent message or Transfers it to some mailbox, that message is not copied into the Sent Messages mailbox.

    If the In Box option is selected for a User Rule, the Rule is applied to every message that appears in your In Box. Each message is processed only once, i.e. if you mark a message as unread again, your User Rules will not be applied again.

    Since messages may meet conditions specified in several Rules, you may want to specify the Rule priority: the high priority Rules are checked first. You may specify Inactive in the Priority setting, in this case the Rule will not be used at all.

    You can click the Apply Now button to apply the open Station Rule immediately. The Rule will be applied to all messages in your In Box and the Sent Letter mailbox (if these options are selected).

    Mailing Loop Hazard

    When specifying these automated actions, you should be extremely careful with Rules that include Reply, Forward, Redirect or React actions, the actions that generate messages. The danger is that the same Rule or another Rules may apply to those newly generated messages, thus generating more messages, and so on, until your mailbox get boomed.

    If you create a Rule with vacation message (a Rule that replies to every message you receive, telling that you're out of reach, for example), make sure you're not subscribed to any mailing lists.

    If you want to send copies of every message you sent to somewhere, i.e. you set up a rule that applies to your OutBox and redirects every message to some account, you may get a loop, because redirected messages are also considered as outgoing, and they also will be processed with the same Rule. To avoid that, you should make the Rule to check the messages' destination before creating a copy: